<%--
  Created by IntelliJ IDEA.
  User: cjf
  Date: 2024/9/17
  Time: 12:26
  To change this template use File | Settings | File Templates.
--%>
<%@page contentType="text/html; charset=UTF-8" language="java" %> //主要解决中文乱码

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>声明变量和方法</title>
</head>
<body>
<%!
    public int count;
    public String info(){

        return "hello";




    }
%>
<br>
<%
    out.println(count++);
%>
<br>
<%
    out.println(info());
%>

</body>
</html>